<template>
  <el-config-provider :locale="store.locale">
    <Suspense>
      <!-- 一级路由出口 -->
      <RouterView />
      <!-- <template #default>
        <AsyncComponent />
      </template> -->
      <!-- 在 #fallback 插槽中显示 “正在加载中” -->
      <template #fallback>
        <div style="margin: 0 auto">Loading...</div>
      </template>
    </Suspense>
  </el-config-provider>
</template>

<script lang="ts" setup>
import { useGlobalStore } from '@/stores/global'
import { defineAsyncComponent } from 'vue'
const AsyncComponent = defineAsyncComponent(() => import('@/components/TestAsyncComponent.vue'))
const store = useGlobalStore()
// import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
